#include("./_inc/_layout.html")
#@layout("集成问答 首页", null,null,"jie")
#define content()

#include("./_inc/_navigation.html",cid='')
<link rel="stylesheet" href="/static/css/index.css">
<link rel="stylesheet" href="/static/css/selectFilter.css">
<script type="text/javascript" src="/static/js/selectFilter.js"></script>
<div class="layui-container">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md9">

            #include("./_inc/_top_posts.html",title = "置顶",level = 3)

            <div class="fly-panel" style="margin-bottom: 0;">

                <div class="fly-panel-title fly-filter">
                    <form action="/index" name="search-form" method="get" id="search-form-new" style="color:#C9C5C5;" class="search-form">
                        <input type="hidden" name="filter" value="#(filter)">
                        <input class="hdi" id="postType" maxlength="256" tabindex="1" size="46" name="postType" value="#(postType)" type="hidden">
                        <input class="hdi" id="kw" maxlength="256" tabindex="1" size="46" name="keyWord" value="#(keyWord)" autocomplete="off" placeholder="按关键词筛选" style="height:34px;line-height: 34px">
                        <button alog-action="g-search-anwser" type="submit" id="search-btn" hidefocus="true" tabindex="2" class="btn-global" style="background: #0086cc" >搜索</button>
                    <div class="item">

                        <!-- 这里开始 -->

                        <!--<div class="filter-box">-->
                            <!--<div class="filter-text">-->
                                <!--<input class="filter-title" type="text" readonly placeholder="按时间排序" />-->
                                <!--<i class="icon icon-filter-arrow"></i>-->
                            <!--</div>-->
                            <!--<select id="myselect" name="myselect" onchange="gradeChange()" >-->
                                <!--<option value="createT">时间</option>-->
                                <!--<option value="riewCount">浏览数</option>-->
                            <!--</select>-->
                        <!--</div>-->

                        <!-- 这里结束 -->

                    </div>
                    </form>
                </div>

                <ul class="fly-list">
                    #for(post : pageData.list)
                    <li>
                        <div class="fly-list-info">
                            <span style="font-size: 12px">#date(post.created,"yyyy.MM.dd HH:mm:ss")来自 <a style="color:#428bca;">#(post.user.nickname)</a></span>
                            <b style="font-size: 15px;padding-right: 0">悬赏</b> <span class="fly-list-kiss layui-hide-xs" title="悬赏积分">#(post.pay_point)</span>
                            #if(post.isFinished())
                            <span class="layui-badge fly-badge-accept layui-hide-xs">已结</span>
                            #end
                        </div>
                        <h1 style="font-size: 22px">
                            <a href="/post/#(post.id)"  style="color:#333">#(post.title)</a>
                        </h1>
                            <span>

                            #if(post.content!=null&&post.content.length()<300)
                            <cite>
                                <script type="text/javascript">
                                     var tag='#(post.content)';
                                     var html=tag.replace(/<\/(?!span).*?>/g, "");
                                     var htmls=html;//.replace(/ /g,"");//dds为得到后的内容
                                     document.write(htmls);
                                </script>
                            </cite>
                            #end
                            #if(post.content!=null&&post.content.length()>=300)
                            <cite>
                                  <script type="text/javascript">
                                     var tag='#(post.content)';
                                     var html=tag.replace(/<\/(?!span).*?>/g, "");
                                     var htmls=html;//.replace(/ /g,"");//dds为得到后的内容
                                     document.write(htmls.substring(0,80));
                                </script>
                            </cite>
                            #end

                           </span>

                        <a class="answer_num " title="暂无满意答案"  href="#">
                            <span>#(post.comment_count)</span>
                            <p>回答</p>
                        </a>

                        <div class="tags">
                            <a  >restful</a>

                            <a  >ajax</a>

                            <a >put</a>
                        </div>
                    </li>
                    <div class="share_bar_con">

                        <div id="question_698950_vote">
                            <em class="focusit">赞#(post.vote_up)</em>
                        </div>

                        <div id="question_698950">

                            <span class="interval">|</span>
                            <em class="collection">踩#(post.vote_down)</em>
                        </div>

                        <span class="interval">|</span>
                        <em class="browse">浏览#(post.view_count)</em>
                    </div>
                    #end
                </ul>

                <!-- <div class="fly-none">没有相关数据</div> -->
                #include("./_inc/_pagination.html")
            </div>
        </div>
        <div class="layui-col-md3">



            #include("./_inc/_signin_panel.html")
            #include("./_inc/_answer.html")
            #if(USER!=null)
            #include("./_inc/_recommend.html")
            #end
            #include("./_inc/_hot_posts.html")
            #include("./_inc/_links.html")
            #include("./_inc/_contact.html")

        </div>
    </div>
</div>
#end
<script>
    $(document).ready(function(){
        $(".sort ul ").mouseenter(function(){
            $(".sort ul").css("display","block");
        });
        $(".sort ul ").mouseleave(function(){
            $(".sort ul ").css("display","none");
        });
        $('.filter-box').selectFilter({
            callBack : function (val){
                //返回选择的值
                console.log(val+'-是返回的值')
            }
        });
    });

</script>

<script type="text/JavaScript">
    function gradeChange(){
        alert();
        var objS = document.getElementById("pid");
        var grade = objS.options[objS.selectedIndex].grade;

    }
</script>

<style>
    .fly-list-kiss {
        display: inline-block;
        width: 43px;
        height: 18px;
        line-height: 18px;
        background: url(/static/images/right/reward_bg.png);
        text-align: right;
        color: #fff;
        font-size: 15px;
        font-weight: bold;
    }
    .fly-filter a {
        padding:0;
    }
    .item {
        width: 120px;
        height: 32px;
        float: right;
        margin:10px 0;
    }
    .fly-panel-title{ font-size: 15px!important;}
</style>